<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<style>
    td {
        width: 200px;
        background-color:green;
    }
</style>
<div id="app">
    <table>
        <tr >
            <td>{{i}}</td>
            <td>{{user.name}}</td>
            <td v-text="user.gender"></td>
            <td v-html="user.age"></td>
        </tr>
    </table>

    <br>


    <!--遍历对象-->
    <span v-for="(v,k,i) in user">
        {{i}} - {{v}} -{{k}},
    </span>
    <br>
    <!--遍历数字-->
    <span v-for="a in 11">
        {{a-1}},
    </span>
    <br>

    <!--遍历字符串-->
    <span v-for="a in 'abcdefg'">
        {{a}},
    </span>

</div>

<script src="./node_modules/vue/dist/vue.js">
</script>
<script>
    var dataObj = {
        name: "刘德华",
        num: 0 ,
        users:[
            {name:'柳岩',gender:'女',age:21},
            {name:'有个',gender:'男',age:21},
            {name:'刘亦菲',gender:'女',age:21},
            {name:'范冰冰',gender:'女',age:21},
        ],
        user:{name:'柳岩',gender:'女',age:21}
    };
    //双向绑定
    var vm = new Vue({
        el: "#app",
        data:dataObj,
    });
</script>
</body>
</html>